<div class="zluykes">

<h2><?php __('Chỉ tiêu sản xuất kinh doanh lũy kế (Tháng)');?></h2>
<?php 
            echo '<h3>'.$kh['Donvi']['tendv'].'<br></h3>';
            echo '<h4>';
 
            echo $kh['Thoigian']['tentg'];
            echo ' Từ:'.date('d/m/Y',strtotime($kh['Thoigian']['ngaybd'])).' đến '.date('d/m/Y',strtotime($kh['Thoigian']['ngaykt'])).'. ';
    ?>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Gồm %count% sản phẩm', true)
));
?></p>
    <?php
	  echo $this->Html->link(__('Xuất Excel', true), 
            array('action' => 'excel',$tg,$id_dv));

?>
<br />
<table cellpadding="0" cellspacing="0" id="tables">
<tr>
	
	<th><?php echo $paginator->sort('Tên hàng','tenhh');?></th>
	
	<th><?php echo $paginator->sort('Lũy kế','kqban_n');?></th>
	<th><?php echo $paginator->sort('Kế hoạch','chitieu_n');?></th>
    <th><?php echo $paginator->sort('% hoàn thành','chitieu_n');?></th>
	
	</tr>
<?php
$i = 0;
foreach ($zluykes as $zluyke):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		
		<td>
			<?php echo $zluyke['Zluyke']['tenhh']; ?>
		</td>
	
		<td>
        	<?php
                $soban=0; 
                if(!empty($zluyke['Zluyke']['kqban_n']))
                    $soban=$zluyke['Zluyke']['kqban_n'];
                echo $soban; 
                ?>
			</td>
		<td>
		<?php echo $zluyke['Zluyke']['chitieu_n']; ?>
		
		</td>
        <td>
		<?php 
            if($zluyke['Zluyke']['chitieu_n']==0)
                echo 0;
            else 
                echo ($soban/$zluyke['Zluyke']['chitieu_n']*100).'%'; ?>
		
		</td>
		</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
